package com.itheima.reggie.common;

/**
 * @title: BaseContext
 * @Author 椎名真白
 * @Date: 2022-04-28 10:11
 * @Version 1.0
 */


public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal();

    /**
     * @description:
     * @author: 椎名真白
     * @date: 2022-04-28 10:18
     * @param: id
     **/
    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    /**
     * @description:
     * @author: 椎名真白
     * @date: 2022-04-28 10:18
     * @return: java.lang.Long
     **/
    public static Long getCurrentId() {
        return threadLocal.get();
    }
}
